
#include "log.h"
#include <iostream>
#include <string>
#include "threadpool.h"
sylar::Logger::ptr g_logger=DANIEL_LOG_NAME("g_logger");
void printHello()
{
    for(uint32_t i=0;i<100;i++){
        DANIEL_LOG_DEBUG(g_logger)<<"hello log:"<<std::to_string(i)<<std::string(100,'*');
    }
}
int main()
{
    daniel::ThreadPool::ptr threadpool(new daniel::ThreadPool(4,8));
    for(size_t i=0;i<8;i++){
        threadpool->addTask(printHello);
    }
    threadpool->stop();
    // DANIEL_LOG_DEBUG(g_logger)<<"hello log!"<<std::endl;
    return 0;
}